/*
 * Copyright (c) 2025/5/5 彭友聪
 * TxtEdit is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2. 
 * You may obtain a copy of Mulan PSL v2 at:
            http://license.coscl.org.cn/MulanPSL2 
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.  
 * See the Mulan PSL v2 for more details.  
 * 
 * Author: 彭友聪 
 * email：2923616405@qq.com 
 * date: 2025/5/5 15:11
 * file: ${FILE_NAME}
 * product: DevEco Studio
 * */
//
// Created on 2025/5/5.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#include "Person.h"
Person::Person(char *name, int32_t age, float height) {
    this->name = name;
    this->age = age;
    this->height = height;
}
Person::Person() {
    this->name = nullptr;
    this->age = 0;
    this->height = 0.0f;
}
Person::~Person() {
    if (this->name != nullptr) {
        delete this->name;
    }
    this->name = nullptr;
    this->age = 0;
    this->height = 0.0f;
    delete this;
}
double  Person::getHeight() { return this->height; }
void Person::setHeight(double  height) { this->height = height; }
int32_t Person::getAge() { return this->age; }
void Person::setAge(int32_t age) { this->age = age; }
char *Person::getName() { return this->name; }
void Person::setName(char *name) { this->name = name; }